package Utils;

import java.util.List;

/**
 * 分页信息实体
 * 
 * @author 吴俊明
 * 
 * @param <T>
 */
public class PageBean<T> {
	//当前页
	private int curpage;
	
	//页大小
	private int pageSize;
	
	//总记录数
	private int total;
	
	//总页数
	private int allPage;
	
	//当前页显示的数据集合
	private List<T> list;
		
	public int getCurpage() {
		return curpage;
	}

	public void setCurpage(int curpage) {
		this.curpage = curpage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getAllPage() {
		this.allPage = (total - 1) / pageSize + 1;
		return allPage;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public PageBean(int curpage, int pageSize, int total,
			List<T> list) {
		super();
		this.curpage = curpage;
		this.pageSize = pageSize;
		this.total = total;
		this.list = list;
	}
	public PageBean() {
		
	}
}
